package com.cloud.mkz.common.api.feign.fallback;

import com.cloud.mkz.common.api.feign.ProducerClient;
import com.cloud.mkz.core.common.constant.CommonConstants;
import com.cloud.mkz.core.common.util.ResponseResult;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * ClassName: ProducerServiceFallback 
 * @Description: Kafka消息发送
 * @author: KuangJianyu
 * @date: 2020年4月16日
 */
@Slf4j
@Component
public class ProducerServiceFallback implements ProducerClient {
	@Setter
	private Throwable cause;

	@Override
	public ResponseResult<Boolean> basicSend(String topic, String content, String bustype) {
		log.error("MQ发送消息失败，"+ CommonConstants.ERROR_SHOW_TEXT, cause);
		return null;
	}
}
